home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 204 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.2 KB

  1. From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
  2. Message-ID: <KANZE.96Jan31174421@slsvewt.lts.sel.alcatel.de>
  3. X-Original-Date: 31 Jan 1996 16:44:21 GMT
  4. Path: in2.uu.net!bounce-back
  5. Date: 01 Feb 96 01:58:36 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Newsgroups: comp.std.c++
  8. Subject: Re: friend inline vs inline friend
  9. In-Reply-To: nk@lns598.lns.cornell.edu's message of 25 Jan 1996 16:12:11 GMT
  10. Organization: SEL
  11. References: <sc68e0s5bn.fsf@lnscu1.lns.cornell.edu>
  12. Apparently-To: std-c++@ncar.ucar.edu
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBFAgUBMRAeW+EDnX0m9pzZAQGETwF9HcbiN6cJXUt4h4+WqaBjc3oa/8urfvXf
  15.     4Pae/z1MmmroMYJUXUtLP+MOqQcdxsPs
  16.     =UO6D
  17.  
  18. In article <sc68e0s5bn.fsf@lnscu1.lns.cornell.edu>
  19. nk@lns598.lns.cornell.edu (Nobuhiko Katayama) writes:
  20.  
  21. |>     Where in the draft standard, if any, says one can use (in the
  22. |> class declaration),
  23.  
  24. |> friend inline void a(A&);
  25.  
  26. |> but not
  27.  
  28. |> inline friend void a(A&);
  29.  
  30. Nowhere that I can see.
  31.  
  32. The keyword `friend' occurs as part of the decl-specifier-seq.  This
  33. is an unordered sequence of keywords and typenames.  As far as I can
  34. tell, even
  35.  
  36.     const char inline unsigned friend * f() ;
  37.  
  38. is be legal.  (Just because you can do it doesn't mean you
  39. should:-).
  40.  
  41. In general, I think that good coding practice would impose a
  42. systematic order of some sort, but the importance is consistency, not
  43. the actual order.  (My own preference is: storage-class/typedef/friend
  44. inline virtual/explicit type-specifier cv_qualifiers.  Withing the
  45. type-specifier, I would generally place signed/unsigned first, and
  46. short or long before int or double.  This preference is at least
  47. partially historically conditioned, though.  It corresponds to what I
  48. saw in the first C code I read.)
  49. --
  50. James Kanze         Tel.: (+33) 88 14 49 00        email: kanze@gabi-soft.fr
  51. GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
  52. Conseils, itudes et rialisations en logiciel orienti objet --
  53.                 -- A la recherche d'une activiti dans une region francophone
  54. ---
  55. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  56.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  57.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  58.